package com.example.demo.controller;

import com.example.demo.commom.Result;
import com.example.demo.entity.LendRecord;
import com.example.demo.mapper.LendRecordMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 借出记录控制器1
 */
@RestController
@RequestMapping("/LendRecord1")
@Api(tags = "借出记录", description = " 0328 王晓月")
public class LendRecordController1 {
    @Resource
    private LendRecordMapper lendRecordMapper;

    /**
     * 更新2
     *
     * @param lendRecord 借出记录
     * @return {@link Result }<{@link ? }>
     */
    @PutMapping
    @ApiOperation(value = "更新借出记录")
    public Result<?> update2(@RequestBody LendRecord lendRecord) {
        lendRecordMapper.updateByIsbnAndReaderIdAndBorrownum(lendRecord);
        return Result.success();
    }
}



